<?xml version="1.0" encoding="UTF-8"?>

<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
     xmlns:h="http://java.sun.com/jsf/html"
     xmlns:ui="http://java.sun.com/jsf/facelets"
     xmlns:p="http://primefaces.org/ui"
     template="../../Template.xhtml"
>
<ui:define name="title">Add language </ui:define>

<ui:define name="body">

<h:form>
	<p:panelGrid columns="2">
<h2>Add language </h2>
<p:commandButton value="Back" action="ManageLanguage.xhtml" />
</p:panelGrid>
</h:form>
<br/><br/><br/><br/>
<h:form>
<p:inputText  value="#{languageMB.id}" />
<p:inputText  value="#{languageMB.oldname}" />
<p:messages id="messages" showDetail="true" autoUpdate="true" closable="true" />
   
	<p:panelGrid columns="3">
	<p:outputLabel value="Country :"/>
	<p:selectOneMenu id="country" value="#{languageMB.idPays}" >
		
			<f:selectItems  value="#{languageMB.listePays()}"  var="a" itemValue="#{a.idPays}" itemLabel="#{a.intitule}"  />
</p:selectOneMenu>
<p:message for="country" />
	<p:outputLabel value="Language  :"/>
		<p:inputText id="lan" value="#{languageMB.langue.intitule}" required="true" requiredMessage="Language Code is required" />
		<p:message for="lan" />
		<p:outputLabel value="Language Code :"/>
		<p:inputText id="code" value="#{languageMB.langue.code}" required="true" requiredMessage="Language Code is required" />
		<p:message for="code" />
		
		
		<p:outputLabel value="Flag :"/>
		<p:inputText id="Flag" value="#{languageMB.langue.drapeau}" required="true" requiredMessage="Flag is required" />
		<p:message for="Flag" />
		
		
		<p:outputLabel value="Status :" />
		<p:selectOneMenu value="#{languageMB.langue.statut}" >
			<f:selectItem  itemValue="true" itemLabel="Active"  />
			<f:selectItem  itemValue="false" itemLabel="Inactive"  />
		</p:selectOneMenu><br/>
		<p:commandButton action="#{languageMB.Modifier}" value="Update" ></p:commandButton>
	</p:panelGrid>
</h:form>
	
	
	
	
</ui:define>
</ui:composition>